<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="jquery-2.0.0.min.js"></script>
    <style>
    * {
      margin: 0;
      padding: 0;
    }
    ul {
      list-style: none;
    }
    .wrap {
      width: 330px;
      height: 30px;
      margin: 100px auto 0;
      padding-left: 10px;
      background-color: skyblue;
    }
    .wrap li {
      background-color: skyblue;
    }
    .wrap > ul > li {
      float: left;
      margin-right: 10px;
      position: relative;
    }
    .wrap a {
      display: block;
      height: 30px;
      width: 100px;
      text-decoration: none;
      color: #000;
      line-height: 30px;
      text-align: center;
    }
    .wrap li ul {
      position: absolute;
      top: 30px;
      display: none;
    }
    </style>
</head>
<body>
    <script>
        $(function(){
            $(".wrap>ul>li").mouseenter(function(){
                $(this).children("ul").stop().show(1000);
                
            })
            $(".wrap>ul>li").mouseleave(function(){
                $(this).children("ul").stop().hide(1000);
            })
   })
    </script>
    <!-- <script>
            $(function () {
              //获取所有li，添加移入事件
              $(".wrap>ul>li").mouseenter(function () {
                //设置内部的子元素ul slideDown
                $(this).children("ul").stop().show(600);
              });
              //移出li时，让内部子元素slideUp
              $(".wrap>ul>li").mouseleave(function () {
                $(this).children("ul").stop().hide(600);
              });
              //如果当前运动没有完毕，又添加了新的动画，这时新的动画需要等待当前动画执行完毕才会开始
              //如果持续添加。一定会造成动画的积累，这种情况我们称为动画队列
            });
          </script> -->
    
    <div class="wrap">
        <ul >
            <li>
                <a href="javascript:void(0);">大帅哥</a>
                <ul class="u2">
                    <li>1共同好友他人与</li>
                    <li>2</li>
                    <li>3</li>
                </ul>
            </li>
            <li>
                <a href="javascript:void(0);">大帅哥2</a>
                <ul class="u2">
                    <li>1</li>
                    <li>2</li>
                    <li>3</li>
                </ul>
            </li>
            <li>
                <a href="javascript:void(0);">大帅哥3</a>
                <ul class="u2">
                    <li>1</li>
                    <li>2</li>
                    <li>3</li>
                </ul>
            </li>
            
        </ui>
    </div>
</body>
</html>
